package com.jeejam.product.dao;

import java.util.List;
import java.util.Map;

import com.jeejam.framework.base.dao.BaseMapper;
import com.jeejam.product.pojo.Product;

public interface ProductMapper  extends BaseMapper{
	
	public List<Product> selectByCategoryId(Map<String, Object> params);
	
	public int countsByCategoryId(int rootCategoryId);
	
	public List<Product> selectForNewByCategoryId(Map<String, Object> params);
	
	public int countsForNewByCategoryId(int rootCategoryId);
	
	public List<Product> selectForHotByCategoryId(Map<String, Object> params);
	
	public int countsForHotByCategoryId(int rootCategoryId);
	
	public List<Product> selectForRecommendByCategoryId(Map<String, Object> params);
	
	public int countsForRecommendByCategoryId(int rootCategoryId);
	
	public List<Product> selectByBrandId(Map<String, Object> params);
	
	public List<Product> selectByBrandName(Map<String, Object> params);
	
	public Product selectByCode(String productCode);
	
	public List<Product> selectForRecommendByPage(Map<String, Object> params);
	
	public List<Product> selectForNewByPage(Map<String, Object> params);
	
	public List<Product> selectForBestByPage(Map<String, Object> params);
	
	public List<Product> selectForHotByPage(Map<String, Object> params);
	
	public int countsForRecommend();
	
	public int countsForNew();
	
	public int countsForBest();
	
	public int countsForHot();
	
	public int selectVotes(int id);

	public void updateViews(int id);
	
	public void updateVotes(Map<String, Object> params);
	
}